import request from "@/utils/request";

// 获取权限列表
export function getRoleList(data) {
  return request({
    url: `/role/getRoleList`,
    method: "post",
    data
  });
}

// 获取权限树
export function getRoute(data) {
  return request({
    url: `/role/getRoute`,
    method: "post",
    data
  });
}

// 获取指定权限
export function getRole(data) {
  return request({
    url: `/role/getRole`,
    method: "post",
    data
  });
}

// 添加权限
export function addRole(data) {
  return request({
    url: `/role/addRole`,
    method: "post",
    data
  });
}

// 修改权限
export function updateRole(data) {
  return request({
    url: `/role/updateRole`,
    method: "post",
    data
  });
}

// 删除权限
export function deleteRole(data) {
  return request({
    url: `/role/deleteRole`,
    method: "post",
    data
  });
}
